package org.hot100_3;

public class leetcode226 {
    public TreeNode invertTree(TreeNode root) {

        if (root==null){
            return null;
        }

        TreeNode temp = root.left;

        root.left=root.right;

        root.right=temp;

        invertTree(root.left);
        invertTree(root.right);

        return root ;
    }


}
